package bomberman.runable;

import bomberman.model.Enemy;

/**
 * 敌人移动线程，一直开启
 * @author EX-FUHUICHAO001
 * 2016年9月26日09:50:17
 */
public class MyRunableMoveEnemy implements Runnable {

	private Enemy enemy;
	
	public MyRunableMoveEnemy(Enemy enemy){
		this.enemy = enemy;
	}
	
	
	public void run() {
		while (enemy.isLive()) {
			try {
				enemy.move();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			
		}
	}

	
	

	public Enemy getEnemy() {
		return enemy;
	}


	public void setEnemy(Enemy enemy) {
		this.enemy = enemy;
	}
	
}
